﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sales
{
    public class SalesOrder
    {

        internal IOrderState currentState;

        public SalesOrder()
        {
            this.currentState = new NewOrder(this);
        }


        public void AddOrderLine()
        {
            this.currentState.AddOrderLine();
        }

        internal void _AddOrderLine()
        {
            Console.WriteLine("Pre add order line stuff");
        }

        public void Register()
        {
            currentState.Register();
        }

        internal void _Register()
        {
            Console.WriteLine("Pre register stuff");
        }

        public void Grant()
        {
            this.currentState.Grant();
        }

        internal void _Grant()
        {
            Console.WriteLine("Pre gant stuff!");
        }

        public void Ship()
        {
            this.currentState.Ship();
        }

        internal void _Ship()
        {
            Console.WriteLine("Pre ship stuff!");
        }

        public void Invoice()
        {
            this.currentState.Invoice();
        }

        internal void _Invoice()
        {
            Console.WriteLine("Pre invoice stuff");
        }

        public void Cancel()
        {
            this.currentState.Cancel();
        }

        internal void _Cancel()
        {
            Console.WriteLine("Pre cancel stuff!");
        }
    }
}
